const Koa = require("koa");
let app = new Koa();
const Router = require("koa-router");
let router = new Router();
router.get("/test",ctx=>{
    console.log("有请求过来了");
    ctx.body = {
        info:"4000端口的数据"
    }
})
router.get("/getnews",ctx=>{
    console.log("有请求过来了");
    ctx.body = {
        info:"4000端口的数据2222222"
    }
})
app.use(router.routes());
app.listen(4000);